package com.example.booksystem.bean;


import java.io.Serializable;
import java.sql.Date;

public class Record implements Serializable {

  private long id;
  private long memberId;
  private long bookId;
  private java.sql.Date rentDate;
  private java.sql.Date backDate;
  private double deposit;
  private long userId;
  private String isbn;

  //外键
  private Member member;
  private Book book;
  private User user;


  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }


  public long getMemberId() {
    return memberId;
  }

  public void setMemberId(long memberId) {
    this.memberId = memberId;
  }


  public long getBookId() {
    return bookId;
  }

  public void setBookId(long bookId) {
    this.bookId = bookId;
  }


  public java.sql.Date getRentDate() {
    return rentDate;
  }

  public void setRentDate(java.sql.Date rentDate) {
    this.rentDate = rentDate;
  }


  public java.sql.Date getBackDate() {
    return backDate;
  }

  public void setBackDate(java.sql.Date backDate) {
    this.backDate = backDate;
  }


  public double getDeposit() {
    return deposit;
  }

  public void setDeposit(double deposit) {
    this.deposit = deposit;
  }


  public long getUserId() {
    return userId;
  }

  public void setUserId(long userId) {
    this.userId = userId;
  }


  public String getIsbn() {
    return isbn;
  }

  public void setIsbn(String isbn) {
    this.isbn = isbn;
  }

  public Member getMember() {
    return member;
  }

  public void setMember(Member member) {
    this.member = member;
  }

  public Book getBook() {
    return book;
  }

  public void setBook(Book book) {
    this.book = book;
  }

  public User getUser() {
    return user;
  }

  public void setUser(User user) {
    this.user = user;
  }

  @Override
  public String toString() {
    return "Record{" +
            "id=" + id +
            ", memberId=" + memberId +
            ", bookId=" + bookId +
            ", rentDate=" + rentDate +
            ", backDate=" + backDate +
            ", deposit=" + deposit +
            ", userId=" + userId +
            ", isbn='" + isbn + '\'' +
            ", member=" + member +
            ", book=" + book +
            ", user=" + user +
            '}';
  }

  public Record(long id, long memberId, long bookId, Date rentDate, Date backDate, double deposit, long userId, String isbn) {
    this.id = id;
    this.memberId = memberId;
    this.bookId = bookId;
    this.rentDate = rentDate;
    this.backDate = backDate;
    this.deposit = deposit;
    this.userId = userId;
    this.isbn = isbn;
  }

  public Record() {
  }
}
